<!DOCTYPE html>
<html>
	<?php 
		// create short variable name 接受变量
		$tireqty=$_POST['tireqty'];
		$oilqty=$_POST['oilqty'];
		$sparkqty=$_POST['sparkqty'];
		$totalqty=0;
		$totalqty=$tireqty+$oilqty+$sparkqty;
		$totalamout=0.00;
		define('TIREPRICE',100);
		define('OILPRICE',10);
		define('SPARKPRICE',4);
		
		$totalamout=$tireqty*TIREPRICE
				   +$oilqty*OILPRICE
				   +$sparkqty*SPARKPRICE;
				   
	    $taxrate = 0.10;
	    $totalamoutlegal=$totalamout*(1+$taxrate);
				   
	?>
	<head>
		<meta charset="UTF-8">
		<title>Bob `s Auto Parts -Order Results</title>
	</head>
	<body>
		<h1>Bob `s Auto Parts</h1>
		<h2>Order Result</h2>
		<h2>
			<?php 
				echo '<p>Order processed at'.date('H:i jS F Y')."</p>";
				
				echo 'Items order:'.$totalqty.'<br/>';
				echo 'Subtotal: $'.number_format($totalamout,2).'<br />';
				echo 'Total including tax:$'.number_format($totalamoutlegal,2).'<br />';
//				echo '<p>Your order is as follows:</p>';
//				echo $tireqty.'tires<br />';
//				echo $oilqty.'bottles of oil<br />';
//				echo $sparkqty.'spark plugs <br />';
////				$a = 5 ;
////				$b =&$a ;
////				$a = 7 ;
////				unset($a);
////				echo $a ;
////				echo '<br />';
////				
////				echo $b ;
//				
//				echo phpinfo();
			
			?>
			
		</h2>
	</body>
</html>
